package cn.wolfcode.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author zhangh
 * @version 1.0
 * @date 2025/9/26 09:14
 * @description ‌自动注册端点‌：通过扫描带有 @ServerEndpoint 注解的类，自动注册为 WebSocket 端点，无需手动配置
 */
@Configuration
public class WebSocketConfig {

    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
